package com.sunwayworld.basemodule.basedata.exporttemplate.resource;

import com.sunwayworld.basemodule.basedata.exporttemplate.bean.LimsExportTemplateBean;
import com.sunwayworld.basemodule.basedata.exporttemplate.service.LimsExportTemplateService;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import com.sunwayworld.framework.support.selectable.resource.GenericSelectableResource;
import com.sunwayworld.module.item.file.bean.CoreFileBean;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@RequestMapping("/secure/baseline/basedata/export-templates")
public interface LimsExportTemplateResource extends GenericResource<LimsExportTemplateService, LimsExportTemplateBean, Long>
        , GenericSelectableResource<LimsExportTemplateService, LimsExportTemplateBean, Long> {

    @Log(value = "导出模板下拉", type = LogType.SELECT)
    @RequestMapping(value = "/queries/export-templates", method = RequestMethod.GET)
    List<LimsExportTemplateBean> selectTaskTemplateExport(String templateCode);

    @RequestMapping(value = "/download-template/{templateId}/{fileId}")
    CoreFileBean downloadTemplate(@PathVariable(value = "templateId") String templateId, @PathVariable(value = "fileId") Long fileId);
}
